import request from '@/utils/request'

export function listPlugin(query) {
  return request({
    url: '/plugin/list',
    method: 'get',
    params: query
  })
}

export function createPlugin(data) {
  return request({
    url: '/plugin/create',
    method: 'post',
    data
  })
}

export function delPlugin(data) {
  return request({
    url: '/plugin/delete',
    method: 'post',
    data
  })
}

export function updatePlugin(data) {
  return request({
    url: '/plugin/update',
    method: 'post',
    data
  })
}

export function switchPlugin(data) {
  return request({
    url: '/plugin/switchOpen',
    method: 'post',
    data
  })
}

export function syncPlugin() {
  return request({
    url: '/plugin/sync',
    method: 'get',
  })
}



